<template>
	<uv-row :gutter="20" customStyle="flex-wrap: wrap" v-if="list.length">
		<uv-col span="6" v-for="item in list" :key="item.id">
			<navigator class="card" :url="'/pages-home/market/details?id='+item.id">
				<image :src="item.image" class="rec_img"/>
				<!-- <uv-image :src="item.image" width="100%" height="380rpx" /> -->
				<view class="info">
					<view class="t1">{{ item.cate_name }}</view>
					<view class="t2">
						<text>¥</text>
						<text>{{ item.price }}</text>
						<text>已售{{ item.sales }}+</text>
					</view>
				</view>
			</navigator>
		</uv-col>
	</uv-row>
</template>

<script setup>
	defineProps({
		list: {
			type: Array,
			default: () => []
		}
	})
</script>

<style lang="scss" scoped>
	.card {
		overflow: hidden;
		background: #fff;
		border-radius: 10rpx;
		margin-bottom: 30rpx;
		.rec_img {
			width: 100%;
			height: 380upx;
		}
		.info {
			padding: 20rpx;
			.t1 {
				font-size: 30rpx;
				display: -webkit-box;
				-webkit-box-orient: vertical;
				-webkit-line-clamp: 1;
				overflow: hidden;
			}
			.t2 {
				text {
					&:nth-child(1) {
						color: #CD6230;
						font-size: 20rpx;
					}
					&:nth-child(2) {
						color: #CD6230;
						font-size: 30rpx;
					}
					&:nth-child(3) {
						color: #A7A7A8;
						font-size: 24rpx;
						margin-left: 6rpx;
					}
				}
			}
		}
	}
</style>